home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!ts13-11
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: Coding Standards
- Date: Wed, 20 Mar 96 04:45:40 GMT
- Organization: MiddleWorld SoftWare
- Message-ID: <4io2i7$n9v@sam.inforamp.net>
- References: <4hj8ek$elu@sam.inforamp.net> <4hktar$5o2@galaxy.ucr.edu> <4hmqol$97j@abacus.abasoft.co.uk> <4hsg8r$pmm@sam.inforamp.net> <4i9o6j$p4l@daisy.pgh.wec.com> <4idskb$pc1@sam.inforamp.net> <314EBD08.43BC@virtus.com>
- NNTP-Posting-Host: ts34-09.tor.inforamp.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <314EBD08.43BC@virtus.com>,
- "Richard F. Albury" <richard.albury@virtus.com> wrote:
- >// is the standard C++ comment, so I'm not sure I understand your objection.
-
- What I meant was that the /* */ has been the only standard comment for years.
- The // comment style is a new proposed standard.
-
- >> -a class which can be instantiated with a "new" must have a copy
- >> constructor, a destructor and an assignment operator definition.
- >
- >It's good discipline. Read Scott Meyers' books for more info.
-
- Unfortunately, if we follow everybodies good discipline guidelines, we would
- miss our October deadline by a few years.
-
- >> -optimize code only when you have a problem.
- >> Why not anticipate the problem?
- >
- >You rarely can. Read Plauger's writings on style. One of his sayings is
- >"First make it right, then make it fast." If performance is an issue, use a
- >profiler.
-
- You are right. But the standard explicitly stated that no optimization could
- be done until there was a problem. I'd hate to see that problem in the field.
- I'd rather anticipate the problem, most likely by doing exactly what you
- suggested.
-
- >> -access functions are to be inline.
- >> This is the biggest fallacy in programming today. If you make your
- >> accessors inline, then you have defeated the purpose of data hiding. If
- >> your data's type changes, then you still have to recompile every object
- >> that accesses the member.
- >
- >Agreed.
-
- Thank you. I have a hard time convincing anybody of this.
-
- Agrivar
-